import { http } from '@/utils/http'
// 引入ts类型
import type { categoryListType } from '@/types/category'

enum API {
  CATEGORYLISTAPI = '/category/top',
}

// 获取商品分类列表的接口
export const getCategoryAPI = () => {
  return http<categoryListType[]>({
    method: 'GET',
    url: API.CATEGORYLISTAPI,
  })
}
